import { Injectable, NestInterceptor } from '@nestjs/common';
import { map } from 'rxjs/operators';
@Injectable()
export class GlobalResponseInterceptor implements NestInterceptor {
  intercept(context, next) {
    return next.handle().pipe(
      map((data: any) => {
        data.success = true;
        return data;
      }),
    );
  }
}
